package com.train.course.mapper;

import com.train.course.domain.VideoLike;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 视频点赞Mapper接口
 * 
 * @author ruoyi
 */
@Mapper
public interface VideoLikeMapper 
{
    /**
     * 查询视频点赞
     * 
     * @param likeId 视频点赞主键
     * @return 视频点赞
     */
    public VideoLike selectVideoLikeById(Long likeId);

    /**
     * 查询视频点赞列表
     * 
     * @param videoLike 视频点赞
     * @return 视频点赞集合
     */
    public List<VideoLike> selectVideoLikeList(VideoLike videoLike);

    /**
     * 根据用户ID和视频ID查询点赞记录
     * 
     * @param userId 用户ID
     * @param videoId 视频ID
     * @param videoType 视频类型
     * @return 视频点赞
     */
    public VideoLike selectVideoLikeByUserAndVideo(Long userId, Long videoId, String videoType);

    /**
     * 统计视频点赞数
     * 
     * @param videoId 视频ID
     * @param videoType 视频类型
     * @return 点赞数
     */
    public int countVideoLikeByVideoId(Long videoId, String videoType);

    /**
     * 新增视频点赞
     * 
     * @param videoLike 视频点赞
     * @return 结果
     */
    public int insertVideoLike(VideoLike videoLike);

    /**
     * 删除视频点赞
     * 
     * @param likeId 视频点赞主键
     * @return 结果
     */
    public int deleteVideoLikeById(Long likeId);

    /**
     * 根据用户ID和视频ID删除点赞记录
     * 
     * @param userId 用户ID
     * @param videoId 视频ID
     * @param videoType 视频类型
     * @return 结果
     */
    public int deleteVideoLikeByUserAndVideo(Long userId, Long videoId, String videoType);

    /**
     * 批量删除视频点赞
     * 
     * @param likeIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteVideoLikeByIds(Long[] likeIds);
}